﻿using IMT.Models;
using CJ.SSOClient.Attributes;
using Newtonsoft.Json;

namespace IMT.Controllers
{
    public class SSOCallBackingController : CJ.SSOClient.SSOAuthClientController
    {
        //
        // GET: /SSOCallBacking/

        [NeedUrlAuthorize(false)]
        public override void CallBacking(string uid, string url, string userJson)
        {
            var user = JsonConvert.DeserializeObject<UserInfo>(userJson);
            System.Web.HttpContext.Current.Session[UserInfo.SESSION_KEY] = user;
            base.CallBacking(uid, url, userJson);
        }

    }
}
